home *** CD-ROM | disk | FTP | other *** search
/ The Sunday Times: The Month 2003 December / The Sunday Times - The Month 2003-12.iso / mac / The Month DEC 03 / engine / modules / thumbs_wide.swf / scripts / frame_1 / DoAction.as
Text File  |  2003-10-02  |  3KB  |  108 lines

  1. function loadImage(mc, node, extrapath)
  2. {
  3.    var _loc3_ = extrapath;
  4.    _loc3_ != null ? 0 : (_loc3_ = "");
  5.    var strDefaultPath = Tardis.ASSETS_FOLDER + "images/" + Tardis.ActiveSection.id + "/";
  6.    var _loc1_ = node.firstChild.nodeValue;
  7.    var _loc2_ = node.attributes.path;
  8.    if(_loc2_ != null)
  9.    {
  10.       _loc1_ = _loc2_ + _loc1_;
  11.    }
  12.    else
  13.    {
  14.       _loc1_ = strDefaultPath + _loc3_ + _loc1_;
  15.    }
  16.    strPathPrefix != null ? 0 : (strPathPrefix = "");
  17.    mc.loadMovie(strPathPrefix + _loc1_);
  18. }
  19. function addLink(mc)
  20. {
  21.    Links[mc.link] = mc;
  22. }
  23. function getMCfromLink(Item)
  24. {
  25.    var _loc1_ = Item;
  26.    if(Links[_loc1_] == null)
  27.    {
  28.       var _loc2_ = [];
  29.       while(_loc1_ != sideMenu.ItemHome)
  30.       {
  31.          _loc2_.unshift(_loc1_._name.split("_").pop());
  32.          _loc1_ = _loc1_._parent._parent;
  33.       }
  34.       var _loc3_ = _loc2_.join("/");
  35.       Links[_loc1_] = Links[_loc3_];
  36.    }
  37.    return Links[_loc1_];
  38. }
  39. function removeLinkListener()
  40. {
  41.    Tardis.sideMenu.EB.removeListener(this);
  42. }
  43. function txtOver(mc)
  44. {
  45.    var _loc1_ = mc;
  46.    _loc1_.gotoAndStop("over");
  47.    if(blnHasPreview)
  48.    {
  49.       _parent.preview.doOver(_loc1_.num);
  50.    }
  51.    Tardis.sideMenu.doOver(_loc1_.link);
  52. }
  53. function txtOut(mc)
  54. {
  55.    var _loc1_ = mc;
  56.    _loc1_.gotoAndStop("off");
  57.    if(blnHasPreview)
  58.    {
  59.       _parent.preview.doOut(_loc1_.num);
  60.    }
  61.    Tardis.sideMenu.doOut(_loc1_.link);
  62. }
  63. function txtUp(mc)
  64. {
  65.    Tardis.sideMenu.doUp(mc.link);
  66. }
  67. function init()
  68. {
  69.    var _loc3_ = "clip" + nodeData.childNodes.length + "MC";
  70.    attachMovie(_loc3_,"mc_module",++depth);
  71.    mc_module._x = 10;
  72.    mc_module._y = 10;
  73.    var _loc2_ = Tardis.ActiveSection.id;
  74.    var _loc1_ = Tardis.Colors;
  75.    var strColor = _loc1_.getString(_loc2_);
  76.    SECTION_COLOR = _loc1_.getHex(_loc2_);
  77.    DEFAULT_COLOR = _loc1_.getHex("default");
  78.    THUMB_PATH = nodeData.attributes.thumbpath;
  79.    play();
  80. }
  81. function doOver(num)
  82. {
  83.    mc_module["mc_text_" + num].gotoAndStop("over");
  84. }
  85. function doOut(num)
  86. {
  87.    mc_module["mc_text_" + num].gotoAndStop("off");
  88. }
  89. function positionElements(mc)
  90. {
  91.    var _loc1_ = mc;
  92.    _loc1_.activeBtn._width = _loc1_.imgToCheck._width + 10;
  93.    _loc1_.titleFF._width = _loc1_.imgToCheck._width;
  94.    _loc1_.titleFF._y = _loc1_.imgToCheck._height;
  95.    _loc1_._visible = true;
  96. }
  97. Links = {};
  98. Tardis.sideMenu.EB.addListener(this);
  99. blnHasPreview = 1;
  100. stop();
  101. onReady();
  102. this.onUnload = function()
  103. {
  104.    removeLinkListener();
  105.    clearInterval(intervalID);
  106.    this.onUnload = null;
  107. };
  108.